KikuGie's Commons
Toggle table of contents
0.3.0
jvm
Platform filter
jvm
Switch theme
Search in API
KikuGie's Commons
KikuGie's Commons
/
dev.kikugie.commons.collections
/
ifNotEmpty
if
Not
Empty
inline
fun
<
T
>
Array
<
out
T
>
.
ifNotEmpty
(
action
:
Array
<
out
T
>
.
(
)
->
Unit
)
:
Array
<
out
T
>
(
source
)
inline
fun
ByteArray
.
ifNotEmpty
(
action
:
ByteArray
.
(
)
->
Unit
)
:
ByteArray
(
source
)
inline
fun
CharArray
.
ifNotEmpty
(
action
:
CharArray
.
(
)
->
Unit
)
:
CharArray
(
source
)
inline
fun
ShortArray
.
ifNotEmpty
(
action
:
ShortArray
.
(
)
->
Unit
)
:
ShortArray
(
source
)
inline
fun
IntArray
.
ifNotEmpty
(
action
:
IntArray
.
(
)
->
Unit
)
:
IntArray
(
source
)
inline
fun
LongArray
.
ifNotEmpty
(
action
:
LongArray
.
(
)
->
Unit
)
:
LongArray
(
source
)
inline
fun
FloatArray
.
ifNotEmpty
(
action
:
FloatArray
.
(
)
->
Unit
)
:
FloatArray
(
source
)
inline
fun
DoubleArray
.
ifNotEmpty
(
action
:
DoubleArray
.
(
)
->
Unit
)
:
DoubleArray
(
source
)
inline
fun
BooleanArray
.
ifNotEmpty
(
action
:
BooleanArray
.
(
)
->
Unit
)
:
BooleanArray
(
source
)
inline
fun
<
T
,
C
:
Collection
<
T
>
>
C
.
ifNotEmpty
(
action
:
C
.
(
)
->
Unit
)
:
C
(
source
)
inline
fun
<
K
,
V
,
M
:
Map
<
K
,
V
>
>
M
.
ifNotEmpty
(
action
:
M
.
(
)
->
Unit
)
:
M
(
source
)
Applies
action
to the receiver if it's not empty.